# notin [![Build Status](https://travis-ci.org/mjakob/notin.svg?branch=develop)](https://travis-ci.org/mjakob/notin)

Find all files in one directory that are not in another.

## Requirements

Python v3.2 or later, nothing more, nothing less!

## Installation

```ShellSession
$ pip install git+https://github.com/mjakob/notin.git
```

## Usage

Notin is a very simple tool that was created so the author could
remove a directory of old photos, after re-arranging them in a new
directory, without worrying about losing any of them. Given two
directories,

```ShellSession
$ tree
.
├── a
│   ├── c
│   │   └── same.txt
│   ├── different.txt
│   └── same.txt
└── b
    ├── d
    │   └── same.txt
    ├── different.txt
    ├── same.txt
    └── unique.txt

4 directories, 7 files
```

notin finds all files in the second directory that are not present in
the first.  Notin uses md5sums and cares little about the directory
structure and filenames.

```ShellSession
$ notin a b
b/different.txt
b/unique.txt
```

The full help output is:

```ShellSession
$ notin --help
usage: notin [-h] [-v] SOURCEDIR TARGETDIR

Find all files under TARGETDIR that are not under SOURCEDIR.

positional arguments:
  SOURCEDIR      a source directory
  TARGETDIR      a target directory to search for files not in SOURCEDIR

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  turn on verbose output to stderr
```

## License

Notin was written by Mattias Jakobsson and is release under the
[GNU General Public License version 3](LICENSE) or (at your option)
any later version.
